<%@page import="bean.Admin"%>
<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>发布新闻</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../../css/layui.css" media="all">
</head>
<body>

	<fieldset class="layui-elem-field layui-field-title"
		style="margin-top: 20px;">
		<legend>新闻发布</legend>
	</fieldset>
	<%
		Admin admin = (Admin) session.getAttribute("admin");
		String currentPage1 = request.getParameter("currentPage");
		int currentPage=1;
		if(currentPage1!=null){
			currentPage= Integer.parseInt(request.getParameter("currentPage"));
		}

	%>
	<form
		action="/News/InsertNews?adminName=<%=admin.getName()%>"
		method="post" name="publish" enctype="multipart/form-data">

		<div class="layui-form-item">
			<label class="layui-form-label">新闻标题</label>
			<div class="layui-input-block">
				<input type="text" name="title" lay-verify="title"
					autocomplete="off" placeholder="请输入新闻标题（15字左右，否则可能导致发布失败）"
					class="layui-input">
			</div>
		</div>

		<div class="layui-form-item layui-form-text">
			<label class="layui-form-label">新闻内容</label>
			<div class="layui-input-block">
				<textarea style="width: 90%; height: 335px"
					placeholder="请输入新闻内容（如需添加新闻配图，请在下方选择图片文件）" class="layui-textarea"
					name="text"></textarea>
			</div>
		</div>

		<div class="layui-input-block">
			<input type="file" name="file">
		</div>

		<div class="layui-btn-container">
			<div class="layui-input-block">
				<input type="submit" class="layui-btn layui-btn-radius" value="发布"></input>
				<input type="reset" class="layui-btn layui-btn-radius" value="重置"></input>
				<a href="manageNews.jsp?currentPage=<%=currentPage%>"><input
					type="button" class="layui-btn layui-btn-radius" value="返回"></input></a>
			</div>
		</div>

	</form>


</body>
</html>